<div class="gaji form">
<?php //pr($pendapatan_fields) ?>
<?php //pr($potongan_fields) ?>
<?php //pr($dataGaji) ?>
   
<?php echo $this->Form->create('Payroll');?>
   <fieldset>
      <legend><?php __('Penggajian Karyawan'); ?></legend>
      
	<?php
      echo $this->Form->input('divisi_id',array('options' => $divisi_list, 'empty' => '--pilih divisi--'));
      echo $this->Form->input('Gaji.karyawan_id',array('options' => $karyawan_list, 'empty' => '--all--'));
      echo '<fieldset>';
      echo '<legend style="font-weight:bold;">PENDAPATAN</legend>';
      
      echo '<table>';
      
      echo '<tr>';
      echo '<td style="width:300px;">'.$this->Form->input('Gaji.gaji_pokok',array('value'=>$dataGaji['Gaji']['gaji_pokok'])).'</td>';
      echo '<td>'.$this->Form->input('Gaji.uang_makan',array('value'=>$dataGaji['Gaji']['uang_makan'])).'</td>';
      echo '</tr>';
      
      echo '<tr>';
      echo '<td>'.$this->Form->input('Gaji.uang_transport',array('value'=>$dataGaji['Gaji']['uang_transport'])).'</td>';
      echo '<td>'.$this->Form->input('Gaji.premi_hadir',array('value'=>$dataGaji['Gaji']['premi_hadir'])).'</td>';
      echo '</tr>';
      
      echo '<tr>';
      echo '<td>'.$this->Form->input('Gaji.imk',array('value'=>$dataGaji['Gaji']['imk'])).'</td>';
      echo '<td>'.$this->Form->input('Gaji.uang_shift',array('value'=>$dataGaji['Gaji']['uang_shift'])).'</td>';
      echo '</tr>';
      
      echo '<tr>';
      echo '<td>'.$this->Form->input('Gaji.uang_jabatan',array('value'=>$dataGaji['Gaji']['uang_jabatan'])).'</td>';
      echo '<td>'.$this->Form->input('Gaji.tunjangan_skill',array('value'=>$dataGaji['Gaji']['tunjangan_skill'])).'</td>';
      echo '</tr>';
      
      echo '<tr>';
      echo '<td>'.$this->Form->input('Gaji.tunjangan_insentif',array('value'=>$dataGaji['Gaji']['tunjangan_insentif'])).'</td>';
      echo '<td>'.$this->Form->input('Gaji.tunjangan_kesehatan',array('value'=>$dataGaji['Gaji']['tunjangan_kesehatan'])).'</td>';
      echo '</tr>';
      
      echo '<tr>';
      echo '<td>'.$this->Form->input('Gaji.uang_cuti',array('value'=>$dataGaji['Gaji']['uang_cuti'])).'</td>';
      echo '<td>&nbsp;</td>';
      echo '</tr>';
      
      echo '</table>';
      
      echo '</fieldset>';
      
      echo '<fieldset>';
         echo '<legend style="font-weight:bold;">POTONGAN</legend>';
         
            echo '<fieldset>';
               echo '<legend>Telat</legend>';
               echo '<table>';
               
               echo '<tr>';
               echo '<td style="width:300px;">'.$this->Form->input('Gaji.telat_1',array('value'=>$dataGaji['Gaji']['telat_1'])).'</td>';
               echo '<td>'.$this->Form->input('Gaji.telat_2',array('value'=>$dataGaji['Gaji']['telat_2'])).'</td>';
               echo '</tr>';
               
               echo '<tr>';
               echo '<td>'.$this->Form->input('Gaji.telat_3',array('value'=>$dataGaji['Gaji']['telat_3'])).'</td>';
               echo '<td>'.$this->Form->input('Gaji.telat_4',array('value'=>$dataGaji['Gaji']['telat_4'])).'</td>';
               echo '</tr>';
               
               echo '<tr>';
               echo '<td>'.$this->Form->input('Gaji.telat_5',array('value'=>$dataGaji['Gaji']['telat_5'])).'</td>';
               echo '<td>&nbsp;</td>';
               echo '</tr>';
               echo '</table>';
               
            echo '</fieldset>';
               
            echo '<fieldset>';
               echo '<legend>Pulang Cepat</legend>';
               echo '<table>';
               
                  echo '<tr>';
                  echo '<td style="width:300px;">'.$this->Form->input('Gaji.pulang_cepat_1',array('value'=>$dataGaji['Gaji']['pulang_cepat_1'])).'</td>';
                  echo '<td>'.$this->Form->input('Gaji.pulang_cepat_2',array('value'=>$dataGaji['Gaji']['pulang_cepat_2'])).'</td>';
                  echo '</tr>';
                  
                  echo '<tr>';
                  echo '<td>'.$this->Form->input('Gaji.pulang_cepat_3',array('value'=>$dataGaji['Gaji']['pulang_cepat_3'])).'</td>';
                  echo '<td>&nbsp;</td>';
                  echo '</tr>';
                  
                  echo '</table>';
                  
            echo '</fieldset>';
            
      echo '</fieldset>';
      
      echo '<fieldset>';
         echo '<legend style="font-weight:bold;">OVERTIME</legend>';
         echo '<table>';
            echo '<tr>';
		echo '<td style="width:300px;">'.$this->Form->input('Gaji.overtime_I').'</td>';
		echo '<td>'.$this->Form->input('Gaji.total_overtime_I').'</td>';
            echo '</tr>';
            
            echo '<tr>';
		echo '<td>'.$this->Form->input('Gaji.overtime_II').'</td>';
		echo '<td>'.$this->Form->input('Gaji.total_overtime_II').'</td>';
            echo '</tr>';
            
            echo '<tr>';
		echo '<td>'.$this->Form->input('Gaji.overtime_III').'</td>';
		echo '<td>'.$this->Form->input('Gaji.total_overtime_III').'</td>';
            echo '</tr>';
            
            echo '<tr>';
		echo '<td>'.$this->Form->input('Gaji.grand_total_overtime').'</td>';
            echo '<td>&nbsp</td>';
            echo '</tr>';
            
         echo '</table>';
      echo '</fieldset>';

      echo $this->Form->input('Gaji.total_gaji');
      echo $this->Form->input('Gaji.potongan_jamsostek');
      echo $this->Form->input('Gaji.pph21');
      echo $this->Form->input('Gaji.grand_total');
	?>
	</fieldset>
   
<?php echo $this->Form->end(__('Submit', true));?>
</div>

<?php echo $javascript->link('/js/payroll/gaji_pembuatan_page'); ?>
